package com.wzp;

import java.util.HashMap;

/**
 * -verbose:gc -XX:SurvivorRatio=1 -XX:+PrintFlagsFinal -Xms10M -Xmx10M -XX:MaxDirectMemorySize=5M -Xss128k -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationStoppedTime -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/Users/wangzhengpeng/study/dump
 *
 * @author wangzhengpeng
 */
public class HelloStackOverFlow {

    private int counter;

    public void count() {
        counter++;
        count();
    }

    public static void main(String[] args) {
        System.out.println("HelloStackOverFlow");
        HelloStackOverFlow helloStackOverFlow = new HelloStackOverFlow();
        try {
            helloStackOverFlow.count();
        } catch (Exception e) {
            e.printStackTrace();
            throw e;
        }

    }
}
